import { QueryParams, PaginationParams } from "@purchasing/components"

import { useApi } from "./api"

export function useExportData(
  url: string,
  params: QueryParams,
  pagination: PaginationParams,
) {
  return useApi("/export", { immediate: false })
    .post({ url, params, pagination })
    .json()
}
